package com.mic.service;

import com.mic.dao.AdminMapper;
import com.mic.pojo.*;

import java.util.List;

public class AdminServiceImpl implements AdminService{

    AdminMapper adminMapper;

    public void setAdminMapper(AdminMapper adminMapper) {
        this.adminMapper=adminMapper;
    }

    @Override
    public int addUser(User user) {
        return adminMapper.addUser(user);
    }

    @Override
    public int deleteUser(Integer userId) {
        return adminMapper.deleteUser(userId);
    }

    @Override
    public int updateUser(User user) {
        return adminMapper.updateUser(user);
    }

    @Override
    public List<User> queryAllUser() {
        return adminMapper.queryAllUser();
    }

    @Override
    public List<Admin> queryAllAdmin() {
        return adminMapper.queryAllAdmin();
    }

    @Override
    public List<Article> queryAllArticle() {
        return adminMapper.queryAllArticle();
    }

    @Override
    public User queryUserByUserId(Integer userId) {
        return adminMapper.queryUserByUserId(userId);
    }



}
